import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/pages/index/index'
import Customization from '@/pages/customization/customization'
import Order from '@/pages/order/order'
import Mine from '@/pages/mine/mine'
import MyWallet from '@/pages/my-wallet/my-wallet'
import ShoppingCart from '@/pages/shopping-cart/shopping-cart'
import Address from '@/pages/address/address'
import UserInfo from '@/pages/user-info/user-info'
import AddAddress from '@/pages/add-address/add-address'
import EditAddress from '@/pages/edit-address/edit-address'
import GoodsDetail from '@/pages/goods-detail/goods-detail'
import OrderDetail from '@/pages/order-detail/order-detail'
import GoodsPayed from '@/pages/order-detail/goods-payed/goods-payed'
import GoodsToPay from '@/pages/order-detail/goods-to-pay/goods-to-pay'
import ActivityToPay from '@/pages/order-detail/activity-to-pay/activity-to-pay'
import ActivityPayed from '@/pages/order-detail/activity-payed/activity-payed'
import Logistics from '@/pages/logistics/logistics'
import ApplyRefund from '@/pages/apply-refund/apply-refund'
import ComfirmOrderDetail from '@/pages/comfirm-order-detail/comfirm-order-detail'
import goodsClassify from '@/pages/goods/classify/classify'
import search from '@/pages/goods/search/search'
import Chat from '@/pages/chat/chat'
import Payment from '@/pages/payment/payment'
import test from '@/components/login-model/login-model'
Vue.use(Router)

export default new Router({
//	mode:"history",
  routes: [
    {
      path: '/',
      redirect: '/index'
    },
    {
      path: '/index',
      name: 'Index',
      component: Index,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
    {
      path: '/customization',
      name: 'Customization',
      component: Customization,
      meta: {
        keepAlive: true // 需要被缓存
      }
    },
    {
      path: '/order',
      name: 'Order',
      component: Order,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
    {
      path: '/mine',
      name: 'Mine',
      component: Mine,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
     {
      path: '/wallet',
      name: 'MyWallet',
      component: MyWallet,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
     {
      path: '/shoppingCart',
      name: 'ShoppingCart',
      component: ShoppingCart,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
    {
      path: '/address/:page_from',
      name: 'Address',
      component: Address,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },{
      path: '/userInfo',
      name: 'UserInfo',
      component: UserInfo,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
    {
      path: '/addAddress/:page_from',
      name: 'AddAddress',
      component: AddAddress,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
    {
      path: '/editAddress',
      name: 'EditAddress',
      component: EditAddress,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
     {
      path: '/goodsDetail/:goods_id/:show_type',
      name: 'GoodsDetail',
      component: GoodsDetail,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
     {
      path: '/orderDetail/:all_no/:order_label/:is_payed',
      name: 'OrderDetail',
      component: OrderDetail,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
    {
      path: '/goodsToPay/:all_no/:order_label',
      name: 'GoodsToPay',
      component: GoodsToPay,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
     {
      path: '/goodsPayed/:all_no/:order_label',
      name: 'GoodsPayed',
      component: GoodsPayed,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
    {
      path: '/activityToPay/:all_no/:order_label',
      name: 'ActivityToPay',
      component: ActivityToPay,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
    {
      path: '/activityPayed/:all_no/:order_label',
      name: 'ActivityPayed',
      component: ActivityPayed,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
     {
      path: '/logistics',
      name: 'Logistics',
      component: Logistics,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
    {
      path: '/applyRefund',
      name: 'ApplyRefund',
      component: ApplyRefund,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
    {
      path: '/comfirmOrderDetail',
      name: 'ComfirmOrderDetail',
      component: ComfirmOrderDetail,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
     {
      path: '/goodsClassify/:gc_id',
      name: 'goodsClassify',
      component: goodsClassify,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
     {
      path: '/search',
      name: 'search',
      component: search,
			meta: {
				keepAlive: false, //此组件不需要被缓存
			}
    },
    {
      path: '/chat',
      name: 'chat',
      component: Chat
    },
    {
      path: '/payment',
      name: 'Payment',
      component: Payment
    },
     {
      path: '/test',
      name: 'test',
      component: test
    }
  ]
})
